

#Soya imports
import soya, soya.sdlconst

#Python imports
import sys, os, os.path

#Our imports
from units import *
from constants import BOAT_HEIGHT

class BoatBody(soya.Body):
    def __init__(self, parent, model, eoBoat, *pargs, **kws):
        soya.Body.__init__(self, parent, model, *pargs, **kws)
        self.engBoat = eoBoat
        eoBoat.animate_hook = lambda p: self.handleAnimatedMove(p)
    
    def handleAnimatedMove(self, pos):
        self.move(soya.Point( inches(pos.x), BOAT_HEIGHT, inches(pos.y) ))
    
    #def begin_round(self):
    #    pass
    
    #def advance_time(self, proportion):
    #    pass